const debounce = function (fn: any, wait: number){
    let timer:any = null
    return function(){
        clearTimeout(timer)
        timer = setTimeout(function () {
            fn()
        },wait)
    }
}

export default debounce